home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00038_new character behavior on test screen.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  1.0 KB  |  48 lines

  1. property pCharCode, pSpr, pCharList, pTextList
  2.  
  3. on beginSprite me
  4.   global gDemoVersion, gDemoCharacters, gFullCharacters
  5.   pSpr = sprite(me.spriteNum).member
  6.   if gDemoVersion then
  7.     pCharList = duplicate(gDemoCharacters)
  8.   else
  9.     pCharList = duplicate(gFullCharacters)
  10.   end if
  11.   sort(pCharList)
  12.   pTextList = EMPTY
  13.   repeat with OG in pCharList
  14.     put string(OG) & RETURN after pTextList
  15.   end repeat
  16.   delete char -30000 of pTextList
  17.   pSpr.member.text = pTextList
  18. end
  19.  
  20. on mouseDown me
  21.   thisLine = the mouseLine
  22.   if keyPressed("1") then
  23.     newSlot = 1
  24.   else
  25.     if keyPressed("2") then
  26.       newSlot = 2
  27.     else
  28.       if keyPressed("3") then
  29.         newSlot = 3
  30.       else
  31.         newSlot = VOID
  32.       end if
  33.     end if
  34.   end if
  35.   if (thisLine >= 1) and (thisLine <= count(pCharList)) then
  36.     if not newCharacterEnters(#Always, pCharList[thisLine], newSlot) then
  37.       alertBeep()
  38.     end if
  39.   end if
  40. end
  41.  
  42. on mouseWithin me
  43.   thisLine = the mouseLine
  44.   if thisLine > 0 then
  45.     hilite line thisLine of field the member of pSpr
  46.   end if
  47. end
  48.